namespace IQIGame.Onigao.GamePlay
{
    /// <summary>
    /// 1.角色播放动画时，播放同名动作，没有就不播放
    /// 2.角色停止一段时间后，播放longidle
    /// </summary>
    public class SmallPetAnimationComponent : EntityAnimationComponent
    {
        public override uint MaxStore => 20;

        public override void OnComponentEvent<T>(TComponentEvent eventType, T arg)
        {
            if (_entity is not SmallPetEntity smallPetEntity)
            {
                return;
            }

            switch (eventType)
            {
                case TComponentEvent.OnEntityObjectLoaded:
                    animator = _entity.GetAnimator();
                    break;
                case TComponentEvent.OnEntityObjectHided:
                    break;
            }
        }
    }
}